firstSub("AAAAA", "BBBBB");
print("done: firstVar  = $firstVar\n");
print("done: secondVar = $secondVar\n\n");

sub firstSub{
    local ($firstVar) = $_[0];
    my($secondVar)    = $_[1];

    print("firstSub: firstVar  = $firstVar\n");
    print("firstSub: secondVar = $secondVar\n\n");

    secondSub();

    print("firstSub: firstVar  = $firstVar\n");
    print("firstSub: secondVar = $secondVar\n\n");
}

sub secondSub{
    print("secondSub: firstVar  = $firstVar\n");
    print("secondSub: secondVar = $secondVar\n\n");

    $firstVar  = "CCCCC";
    $secondVar = "DDDDD";

    print("secondSub: firstVar  = $firstVar\n");
    print("secondSub: secondVar = $secondVar\n\n");
}